<import template="/admin/_header" />
<import template="/admin/_content" />

<div class="page-title">
    <div class="title-env">
        <h1 class="title">计划任务</h1>
        <p class="description">这里只能查看<code>计划任务</code>的运行情况，并不能做任何调整</p>
    </div>
    <div class="breadcrumb-env">
        <ol class="breadcrumb bc-1"><li><a href="/admin"><i class="fa-home"></i>管理端</a></li><li><a href="/admin/cron">计划任务</a></li></ol>
    </div>
</div>
<section class="content">
            <div class="row">
                <div class="col-xs-12">
                    <div class="box">
                        <div class="panel panel-default">

                            <div class="panel-heading">
                                <h3 class="panel-title"></h3>

                                <div class="panel-options">
                                    <a href="javascript:;" data-toggle="reload">
                                        <i class="fa-rotate-right"></i>
                                    </a>
                                </div>
                            </div>
                            <div class="panel-body">
                                <div class="table-responsive">
                                    <table cellspacing="0" class="table table-small-font table-bordered table-striped">
                                <tbody>
                                <tr>
                                    <th>任务</th>
                                    <th>说明</th>
                                    <th>下次运行时间</th>
                                    <th>状态</th>
                                    <th>优先级</th>
                                </tr>
                                <if condition="count($cronList) > 0">
                                <loop variable="$cronList" key="$key" value="$cron">
                                <tr id="cron-{$cron->id}">
                                    <td>#{$cron->id}</td>
                                    <td>{$cron->remark}</td>
                                    <td><if condition="$cron->system">-<else>{(date("Y-m-d H:i:s", $cron->nextrun))}</if></td>
                                    <td><if condition="$cron->system">-<else>{(\Helper\Utils::cronStatus($cron->enable, $cron->nextrun))}</if></td>
                                    <td>{$cron->order}</td>
                                </tr>
                                </loop>
                                <else>
                                <tr>
                                    <td>#</td>
                                    <td colspan="5">未找到计划任务</td>
                                </tr>
                                </if>
                                </tbody>
                            </table>
                                </div>
                            </div>
                        </div><!-- /.box-body -->
                    </div><!-- /.box -->
                </div>
            </div>
        </section>
</div>
</div>
<import template="/admin/_footer" />
